<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
	String basePath = "http://" + request.getLocalAddr() + ":"
			+ request.getLocalPort() + request.getContextPath();
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<title>${promptInfo.totalDescInfo}</title>
<head>
<script type="text/javascript">
	$(document).ready(function(){
		$("#selectMenu").selectTB({	
			//传值元素ID
			valElementID:'select_default_value',	
			//显示元素ID
			textElementID:'select_default_text',	
			selectWidth:'198',
			selectHeight:'16',		
			primkeyColumn:'orgID',
			//树根描述
			rootName:'', 
			//要进行树型显示的列，支持一列
			selectShowColumn:'orgName',
			//树型下拉树列表，起始根值
			nodeStartValue:'${session.s_userOrgID}', 
			//描述树形菜单子列
			childNodeColumn:'orgID',
			//描述树形菜单父列
			parentNodeColumn:'orgParentID',	
	    	//ajax 获取所有树json格式信息
	    	ajax:{
				//ajax请求url
				url:'ajaxAction.action', 
				//ajax请求参数
				data:'code=${pmsIndex.sys_org_mgr.code}'
			}
		},{
			animated:false
	    }); 
	    
		$.formValidator.initConfig({formid:"actionForm",onerror:function(){alert("校验没有通过，具体错误请看错误提示")}}); 
		//$("#orgName").formValidator({onshow:"请输入fdasf"});
		//$("#select_default_value").formValidator({onshow:"请选择机构",onfocus:"请选择机构",oncorrect:"谢谢您的配合"}).inputValidator({min:1,onerror:"机构不能为空,请确认"});
		$("#userAccountTip").addClass("onerror").html("不可更改");
		$("#name").formValidator({onshow:"请输入姓名",onfocus:"请输入您的真实姓名",oncorrect:"谢谢您的配合"}).inputValidator({min:1,onerror:"姓名不能为空,请确认"});
		//需要什么正则表达式可以在formValidatorRegex.js里面自己写
		//$("#mobilePhone").formValidator({onshow:"请输入移动电话",onfocus:"移动电话不能为空",oncorrect:"恭喜你,你输对了"}).inputValidator({min:1,onerror:"移动电话不能为空"}).regexValidator({regexp:"mobile",datatype:"enum",onerror:"你输入的移动电话不符合规范"});
		//$("#officePhone").formValidator({onshow:"请输入办公电话",onfocus:"办公电话不能为空",oncorrect:"恭喜你,你输对了"}).inputValidator({min:1,onerror:"办公电话不能为空"}).regexValidator({regexp:"tel",datatype:"enum",onerror:"你输入的办公电话不符合规范"});
		$("#userExtPhone").formValidator({onshow:"请输入分机号码",onfocus:"分机号码不能为空",oncorrect:"恭喜你,你输对了"}).inputValidator({min:1,onerror:"分机号码不能为空"}).regexValidator({regexp:"num",datatype:"enum",onerror:"你输入的分机号码不符合规范"});
		//$("#email").formValidator({onshow:"请输入邮箱地址",onfocus:"邮箱地址不能为空",oncorrect:"恭喜你,你输对了"}).inputValidator({min:1,onerror:"邮箱地址不能为空"}).regexValidator({regexp:"email",datatype:"enum",onerror:"你输入的邮箱不符合规范"});

		$("#changeButton").click(function(){
			$("#hid2").css({"display":"none"});
			$("#hid1").css({"display":""});
			//$("#hid1").append("<td>&nbsp;<font color='red'>*</font><span id='select_default_valueTip' style='width:250px'></span></td>");
		});
	});

</script>
</head>
<body>
<form name="actionForm" method="post" action="operateAction.action" id="actionForm">
<input type="hidden" value="name" name="logColumn" /> 
<input type="hidden" value="true" name="islog" /> 
<input type="hidden" name="code" value="${code}"> 
<input type="hidden" name="paramMap.userID" value="${initMap.userInfo.userID}"> 
<input type="hidden" name="imitateStep" value="${pmsIndex.sys_user_mgr.imitationStep}"> 
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="tableC">
	<tr>
		<td class="tableCleft">&nbsp;</td>
		<td class="tableCcenter">
		<table width="100%" border="0" cellpadding="0" cellspacing="1" class="SkyTDLine">
			<tr>
				<td class="SkyTDLine">
				<table class="SkyTDLine" cellSpacing="1" cellPadding="0" width="100%" border="0">
					<tr class="MeNewTDLine" align="center">
						<td align="left">
						<table class="Ntable" cellSpacing="1" cellPadding="0" width="100%" border="0">
							<tr class="MeNewTDLine">
								<td align="right" class="SkyTDLine" width="10%">所属机构：</td>
								<td  class="SkyTDLine"> 
									<table border="0" cellpadding="0" cellspacing="0">
										<tr style="display:none" id="hid1">	
											<td align="left" width="199">
                                                <div id="selectMenu">
										      		<input type="hidden"  id="select_default_value" name="paramMap.select_org_id">
                                      		      	<input type="hidden" id="select_default_text">
									         	</div>
                                            </td>
										</tr>
										<tr id="hid2">
											<td>
												<input name="paramMap.orgName" type="text" id="orgName" value="${initMap.userInfo.ORG_NAME}" style="width: 200;" readonly/>
												<input type="button" id="changeButton" value="更改">
											</td>
										</tr>
								</table>
								</td>
							</tr>
							<tr class="MeNewTDLine">
								<td align="right" class="SkyTDLine" width="10%">用户帐号：</td>
								<td class="SkyTDLine">&nbsp;<input name="paramMap.account" type="text" readonly="readonly" id="account" value="${initMap.userInfo.userAccount}" style="width: 200;" />&nbsp;<font color="red">*</font><span id="userAccountTip" style="width:250px"></span></td>
							</tr>
							<tr class="MeNewTDLine">
								<td align="right" class="SkyTDLine" width="10%">用户姓名：</td>
								<td class="SkyTDLine">&nbsp;<input name="paramMap.name" type="text" maxlength="20" id="name" value="${initMap.userInfo.userName}" style="width: 200;" />&nbsp;<font color="red">*</font><span id="nameTip" style="width:250px"></span></td>
							</tr>
							<tr class="MeNewTDLine">
								<td align="right" class="SkyTDLine" width="10%">用户性别：</td>
								<td class="SkyTDLine">
								     <s:if test="initMap.userInfo.userGender == 1">
									&nbsp;<input type="radio" name="paramMap.gender" checked="checked" value="1" />男
									&nbsp;<input type="radio" value="0" name="paramMap.gender" />女
	                                 </s:if> 
	                                 <s:elseif test="initMap.userInfo.userGender == 0">
									&nbsp;<input type="radio" name="paramMap.gender" value="1" />男
									&nbsp;<input type="radio" value="0" checked="checked" name="paramMap.gender" />女
								</s:elseif>
								</td>
							</tr>
							<tr class="MeNewTDLine">
								<td align="right" class="SkyTDLine" width="10%">分机号码：</td>
								<td class="SkyTDLine">&nbsp;<input name="paramMap.userExtPhone" type="text" maxlength="15" id="userExtPhone" value="${initMap.userInfo.userExtPhone}" style="width: 200;" /><font color="red">*</font><span id="userExtPhoneTip" style="width:250px"></span></td>
							</tr>
							<tr class="MeNewTDLine">
								<td align="right" class="SkyTDLine" width="10%">移动电话：</td>
								<td class="SkyTDLine">&nbsp;<input name="paramMap.mobilePhone" type="text" maxlength="15" id="mobilePhone" value="${initMap.userInfo.userMobilePhone}" style="width: 200;" /></td>
							</tr>
							<tr class="MeNewTDLine">
								<td align="right" class="SkyTDLine" width="10%">办公电话：</td>
								<td class="SkyTDLine">&nbsp;<input name="paramMap.officePhone" type="text" maxlength="20" id="officePhone" value="${initMap.userInfo.userOfficePhone}" style="width: 200;" /></td>
							</tr>
							<tr class="MeNewTDLine">
								<td align="right" class="SkyTDLine" width="10%">邮箱地址：</td>
								<td class="SkyTDLine">&nbsp;<input name="paramMap.email" type="text" maxlength="200" id="email" value="${initMap.userInfo.userEmail}" style="width: 200;" /></td>
							</tr>						
							<tr class="MeNewTDLine">
								<td align="right" class="SkyTDLine">用户描述：</td>
								<td class="SkyTDLine">&nbsp;<input name="paramMap.description" type="text" maxlength="100" id="description" value="${initMap.userInfo.userDesc}" style="width: 400;" /></td>
							</tr>
							<tr class="MeNewTDLine" align="center">
							<td colSpan="2" class="SkyTDLine"><input type="submit" name="BtnOk" value="修改" id="BtnOk" class="SkyButtonBlur" onMouseOut="this.className='SkyButtonBlur'" onMouseOver="this.className='SkyButtonFocus'" />&nbsp;&nbsp;<input type="button" name="BtnOk" value="返回" id="BtnOk" class="SkyButtonBlur" onMouseOut="this.className='SkyButtonBlur'" onMouseOver="this.className='SkyButtonFocus'" onclick="window.history.back();" /></td>
							</tr>
						</table>
						</td>
					</tr>
				</table>
				</td>
			</tr>
		</table>
		</td>
		<td class="tableCright">&nbsp;</td>
	</tr>
</table>
</form>
</body>
</HTML>
